package com.orange.cetback.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

import lombok.*;

/**
 * <p>
 * 基于遗忘曲线的单词复习表
 * </p>
 *
 * @author chenenjun
 * @since 2025-03-01
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("user_word_review")
public class UserWordReview implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 单词ID
     */
    private Integer wordId;

    /**
     * 间隔阶段(0=新词 1=1天 2=7天...)
     */
    private Integer intervalStage;

    /**
     * 下次复习日期
     */
    private LocalDate nextReviewDate;

    /**
     * 记忆难度系数
     */
    private BigDecimal easeFactor;

    /**
     * 连续正确次数
     */
    private Integer consecutiveCorrect;

    /**
     * 总复习次数
     */
    private Integer totalReviews;

    /**
     * 最后复习时间
     */
    private LocalDateTime lastReviewTime;

    /**
     * 最后复习结果(0=错误 1=正确)
     */
    private Byte lastReviewResult;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;
}
